A link aggregation group (LAG) is obtained by bundling, by using an inverse multiplexing method based on multiple Ethernet links, multiple links connected to one device, so as to increase link bandwidth, provide redundancy backup, and improve link reliability. Multiple links in a link aggregation group may be considered as one logical link. On an Ethernet network, each link corresponds to a port. Therefore, link aggregation is also referred to as port aggregation. All ports in the link aggregation group share one MAC address.
A multi-chassis link aggregation group (MC-LAG) further provides device-level redundancy in addition to link-level redundancy provided by the LAG, and allows multiple network devices to be connected to one multi-homing access device. For the multi-homing access device, the multiple network devices are represented as one logical LAG. Multiple network devices included in an MC-LAG may be switches, routers, or the like. The multi-homing access device may be a network device such as a switch or a router, or may be a non-network device such as a server or a host.
As shown in FIG. 1, FIG. 1 is a schematic structural diagram of an MC-LAG. A multi-homing access device accesses the Internet by using a virtual cluster. The virtual cluster includes at least two network devices, and FIG. 1 shows a network device A and a network device B. Links that respectively connect the at least two network devices to the multi-homing access device form an MC-LAG. From the perspective of the multi-homing access device, there is only one link, that is, the MC-LAG. The at least two network devices can implement both load sharing and mutual backup. The load sharing means that the at least two network devices separately forward some traffic of the multi-homing access device that is determined according to a specific rule. The mutual backup means that when any one of the at least two network devices fails, traffic on the faulty network device may be switched in real time to another network device that does not fail, so as to ensure an uninterrupted user service.
To forward a service flow, a forwarding table used for forwarding the service flow needs to be generated on a network device. As shown in FIG. 1, the forwarding table may include at least one of a media access control (MAC) address table, an Address Resolution Protocol (ARP) table, a multicast table, or a routing table. In addition, there may further be another forwarding table. To implement load sharing and mutual backup on the at least two network devices, forwarding tables on the at least two network devices need to be consistent. The consistency means that each of the forwarding tables on the two network devices needs to include forwarding entries of all service flows on the multi-homing access device. Therefore, forwarding table synchronization needs to be performed between the at least two network devices. When a control plane and a data plane of a network device are separate, a forwarding table of a control plane of each network device needs to be consistent with a forwarding table of a data plane of the network device.
To achieve consistency of forwarding tables, some systems perform forwarding table synchronization between control planes of the at least two network devices. Then, the control planes of the at least two network devices respectively send synchronized forwarding tables to corresponding data planes. But this has a disadvantage: forwarding table synchronization needs to be performed between the control planes of the at least two network devices in the virtual cluster periodically or in real time. However, control protocol packets sent between the control planes have a requirement for software compatibility, that is, the at least two network devices are required to identify a same control protocol. Therefore, after a software version of a network device is upgraded, a software version of another network device needs to be upgraded correspondingly, resulting in complex implementation. In addition, when software versions of the at least two network devices are not upgraded simultaneously, the forwarding tables on the at least two network devices are inconsistent, resulting in a traffic forwarding error and a user service interruption.